package com.kyexpress.common.hrinterview.provider.utils;
/*
 * ************************************************************************
 *
 *  Copyright © 2018 KYE Company
 *  跨越速运集团有限公司版权所有
 *
 *  PROPRIETARY RIGHTS of KYE Company are involved in the
 *  subject matter of this material. All manufacturing, reproduction, use,
 *  and sales rights pertaining to this subject matter are governed by the
 *  license agreement. The recipient of this software implicitly accepts
 *  the terms of the license.
 *  本软件文档资料是跨越速运集团有限公司的资产，任何人士阅读和
 *  使用本资料必须获得相应的书面授权，承担保密责任和接受相应的法律约束。
 *
 * ************************************************************************
 */

import com.kyexpress.framework.model.ResponseData;
/**
 * 错误类型
 * @author liuyl
 * @date 2018/1/4
 */
public enum ErrorEnum {
/***** 用户登录 *****/
    UserNotLogin(30001, "用户未登录"),
    UsernameNotNull(30002, "用户名不能为空"),
    PasswordNotNull(30003, "密码不能为空"),
    UsernameNotExist(30004, "用户名不存在"),
    PasswordNotOk(30005, "密码不正确"),
    /***** 邮件发送 *****/
    EmailAccountNotNull(30006,"邮件帐号不能为空"),
    EmailNicknameNotNull(30007,"邮件呢称不能为空"),
    EmailTitleNotNull(30008,"邮件标题不能为空"),
    EmailContentNotNull(30009,"邮件内容不能为空"),
    EmailSendError(30010,"邮件发送失败"),
    EmailTitleLengthError(30011,"邮件标题不能超过50个字符"),
    EmailContentLenghtError(30012,"邮件内容不能超过1000个字符"),

    PaginationParameterError(30012, "分页参数错误"),

    /***** 文件打包下载  *****/
    ZipDownloanERROR(30011,"文件下载失败"),

    SystemError(30199, "系统异常"),
    NameNull(30100, "姓名不能为空"),
    TelNull(30101, "手机号码不能为空"),
    InterviewTimeNull(30102, "面试时间不能为空"),
    InterviewTimeBeforeCurrent(30103, "面试时间必须在当前时间之后"),
    OfficeLocationNull(30104, "面试地点不能为空"),
    EmailNull(30105, "邮箱不能为空"),
    DepartmentNull(30106, "入职部门不能为空"),
    DepartmentNotExist(30107, "入职部门不存在"),
    EntryTimeBeforeCurrent(30108, "到岗时间必须在当前时间之后"),
    IdNull(30109, "ID不能为空"),
    IdNotExist(30110, "ID记录未找到"),
    PositionNull(30111, "岗位不能为空"),
    TelLegal(30112, "手机号码格式错误"),
    EmailLegal(30113, "邮箱格式错误"),

    FileNameNotNull(40001,"找不到文件"),
    FileIOException(40002,"文件读取失败"),
    FileIOColse(40003,"文件关闭失败"),
    FileEmployeeIdNotNull(40021,"员工ID不能为空"),
    DimensionCodeAndEmployeeIdNotNull(40011,"传入的参数不能为空"),
    EmployeeInfoNotNull(40022,"员工信息找不到"),
    EmployeeUploadFileInfoNotNull(40004,"没有员工文件")
    ;
    private int code;
    private String msg;

    ErrorEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() { return this.msg; }

    public void initResponseData(ResponseData result) {
        result.setMsg(this.msg);
        result.setCode(this.getCode());
    }

}

